package cn.chencaiju.day06;

import java.util.Timer;
import java.util.TimerTask;

public class Anonymity {
	public static void main(String[] args) {
		TimerTask task=new TimerTask() {
			@Override
			public void run() {
				System.out.println("无名之辈！");
			}
		};
		Timer t=new Timer();
		t.schedule(new TimerTask() {
			@Override
			public void run() {
				System.out.println("畅叙幽情！");				
			}			
		}, 1000,1000);
		Thread thread=new Thread(new Runnable() {
			@Override
			public void run() {
				System.out.println("匿名内部类定义该线程任务！");
			}
		});
		thread.start();
	}
}
